<template>
    <div id="cinemasearch">
        <div class="search">
            <form action="/" style="width: 300px;margin-left: 5px;">
                <van-search v-model="keyword" placeholder="请输入搜索关键词" @search="search" />
            </form>
            <van-button type="default" to="/home/cinema">取消</van-button>
        </div>
        <div class="address">离你最近</div>
        <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
            <van-cell v-for="item in datalist" :key="item" :title="item" />
        </van-list>
    </div>
</template>
<script>
    export default {
        data() {
            return {
                loading: false,
                finished: false,
                keyword: "",
                datalist: ["保利国际影城北京天安门店", "北京大观楼影城", "北京首都电影院西单店", "北京地质礼堂影院", "北京首都电影院中华店"],  
            };
        },
        methods: {
            search() {
                console.log("search");
            },
            onLoad() {
                console.log("onLoad");
            },
        },
        created() {
            console.log("Search", this.$route);
            this.keyword = this.$route.query.keyword;

            cinemaListData(this.$store.state.cityid).then((res) => {
                console.log(res);
                this.cinemalist = res.data.data.cinemas;
                console.log("cinemalist", this.cinemalist);
                this.cinemalist.filter()
                $store.state.cityName
            });

        },
    };
</script>
<style>
    .search {
        display: flex;
    }

    .van-button {
        border: 1px solid white;
        font-size: 15px;
        padding-top: 10px;
    }

    .address {
        font-size: 13px;
        line-height: 13px;
        color: rgb(189, 192, 197);
        margin: 20px;
    }
</style>
















<!-- <template>
    <div class="cinemasearch">
        <div class="search" style="width: 310px;">
            <van-search v-model="value" placeholder="请输入搜索关键词" />
        </div>
        <van-button type="default">取消</van-button>

    </div>
</template>
<script>
    export default {
        data() {
            return {
                value: '',
            };
        },
    };
</script>
<style>
    .cinemasearch {
        display: flex;
        justify-content: space-around;
    }
    .van-button {
        border: 1px solid white;
        padding-top: 10px;
        padding-left: 15px;
        font-size: 15px;
    }
</style> -->